
<!DOCTYPE html>
<html>
	<head>
		<title>小说</title>
		<meta  charset="UTF-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
	<script type="text/javascript" src="/public/js/jquery.min.js"></script> 
	<script type="text/javascript" src="/public/js/jquery.qrcode.min.js"></script> 
	<script type="text/javascript">
	$(function(){
		
		$('#qrcode').qrcode({ 
			//render: "table", //table方式 
			width: 120, //宽度 
			height:120, //高度
			text: "{$url}" //任意内容 
		}); 
		
		
		var canvas = $('#qrcode').find("canvas").get(0);
		$('#qrcode').css('display', 'none');
		var url = canvas.toDataURL('image/jpeg');
		$('#img').attr('src', url);
		$('#mobileimg').attr('src', url);
		//$("#download").attr('href', url).get(0).click();
	})

	
	</script>
    <style>
      *{
        padding:0;
        margin:0;
      }
      html,body{
        width:100%;
        height:100%;
        overflow: hidden;
        color:#333;
      }
      .bg1{
        width:100%;
        height: 100%;
        background: url(/public/images/pc.jpg) no-repeat;
        background-size: 100% 100%;
        text-align: center;
        display: none;
      }
      .content1{
        margin:0 auto;
        position: relative;
        top:30%;
      }
      .content1 .img{
        padding:5px;
        background: #fff;
        width:150px;
        margin:0 auto;
      }
      .content1 img{
        display: block;
        width:100%;
      }
      .content1 p{
        margin-top:10px;
        font-size: 14px;
      }

      .bg2{
        width:100%;
        height: 100%;
        background: url(/public/images/mb.jpg) no-repeat;
        background-size: 100% 100%;
        text-align: center;
        display: none;
      }

      .content2 .img{
        padding:5px;
        background: #fff;
        width:60%;
        margin:0 auto;
      }
      .content2 img{
        display: block;
        width:100%;
      }
      .content2 .tips{
        padding-top: 10%;
        width:70%;
        margin:0 auto;
      }
      .content2 h3{
        font-size: 1.2em;
        font-weight: normal;
        margin-bottom: 10px;
      }
      .content2 p{
        font-size: 1em;
        line-height: 1.5em;
        margin-bottom: 1.5em;
        color:#666;
      }

      @media (max-width: 700px) {
        .bg1 {
          display: none;  
        }
        .bg2{
          display: block;
        }
      }
      @media (min-width: 700px) {
        .bg1 {
          display: block;  
        }
        .bg2{
          display: none;
        }
      }
	  #code table,#code2 table{margin:5px auto;text-align:center;}
    </style>
	</head>
    <body>
		<div id="qrcode"></div>
      <div class="bg1">
        <div class="content1">
          <div class="img" id="code">
              <!--跳转url的二维码-->
              <img src="" id="img"/>
          </div>
          <p>请用微信扫描二维码继续浏览</p>
        </div>
      </div>

      <div class="bg2">
        <div class="content2">
          <div class="tips">
              <h3>方法一</h3>
              <p>点击右上角...，分享到微信，在微信内点击分享链接可继续阅读</p>
              <h3>方法二</h3>
              <p>截图保存二维码，用微信扫描保存的二维码继续阅读</p>
          </div>
          <div class="img" >
              <!--跳转url的二维码-->
			  <img src="" width="120" id="mobileimg"/>
          </div>
        </div>
      </div>
      
  	</body>
</html>
